Matthias Clasen [Thu, 25 Mar 2021 20:48:28 +0000 (20:48 +0000)]
Merge branch 'carlosgc/clipboard-crash' into 'master'
clipboard: Fix a crash when GdkContentProviderUnion doesn't support the given data format
See merge request GNOME/gtk!3346
Carlos Garcia Campos [Thu, 25 Mar 2021 14:10:00 +0000 (15:10 +0100)]
clipboard: Fix a crash when GdkContentProviderUnion doesn't support the given data format
After iterating all the providers, all of them returning unsupported
error, gdk_content_provider_union_get_value() returns FALSE without
filing the given GError. Then gdk_clipboard_read_value_internal()
assumes there's a GError when FALSE is returned and
g_task_return_error() fails. We can just chain up to parent
implementation to ensure the GError is filled with unsupported error.
Matthias Clasen [Thu, 25 Mar 2021 12:37:12 +0000 (12:37 +0000)]
Merge branch 'shader' into 'master'
ngl: Fix crash with intel driver on Windows when compiling shaders
Closes #3783
See merge request GNOME/gtk!3344
Xavier Claessens [Wed, 24 Mar 2021 13:30:02 +0000 (09:30 -0400)]
ngl: Fix crash with intel driver on Windows when compiling shaders
Fixes #3783.
Matthias Clasen [Wed, 24 Mar 2021 20:34:47 +0000 (20:34 +0000)]
Merge branch 'wip/fix-stack-get-item' into 'master'
stack: Fix some list model issues
See merge request GNOME/gtk!3345
Mohammed Sadiq [Wed, 24 Mar 2021 14:53:09 +0000 (20:23 +0530)]
stack: Fix check if page is selected
When there is no visible child, gtk_selection_model_is_selected()
was returning TRUE for any invalid position.
So check if the page is non-NULL and match
Mohammed Sadiq [Wed, 24 Mar 2021 13:48:02 +0000 (19:18 +0530)]
stack: Increase reference only if page is non-NULL
g_list_nth_data() may return NULL if position is off the end
Matthias Clasen [Wed, 24 Mar 2021 11:21:21 +0000 (11:21 +0000)]
Merge branch 'gles-fallback' into 'master'
gdkglcontext-wayland: Fallback to GLES 2.0 after legacy failed
See merge request GNOME/gtk!3327
Matthias Clasen [Wed, 24 Mar 2021 11:09:51 +0000 (11:09 +0000)]
Merge branch 'gdkmacosglcontext-fix' into 'master'
gdkmacosglcontext: fix compilation error
See merge request GNOME/gtk!3342
Tom Schoonjans [Wed, 24 Mar 2021 10:07:55 +0000 (10:07 +0000)]
gdkmacosglcontext: fix compilation error
See https://developer.apple.com/documentation/appkit/nsopenglpixelformat/
1436219-initwithattributes?language=occ
Matthias Clasen [Tue, 23 Mar 2021 21:02:39 +0000 (21:02 +0000)]
Merge branch 'builder-tool-placeholder-crash' into 'master'
gtk-builder-tool: Avoid a crash with <placeholder/>
Closes #3781
See merge request GNOME/gtk!3339
Matthias Clasen [Tue, 23 Mar 2021 21:02:11 +0000 (21:02 +0000)]
Merge branch 'wip/chergert/ngl-fix-windows-intel-driver' into 'master'
ngl: move uniform key mapping into uniform state
Closes #3780
See merge request GNOME/gtk!3340
Christian Hergert [Tue, 23 Mar 2021 19:10:12 +0000 (12:10 -0700)]
ngl: move uniform key mapping into uniform state
Previously, we translated the uniform key (an enum) into a location within
the shader program in GskNglProgram. A number of performance improvements
were focused around having low nubers for the uniform locations. Generally
this is the case, but some drivers such as old Intel drivers on Windows
may use rather large numbers for those.
To combat this, we can push the translation of uniform keys into locations
at the GskNglUniformState level so that we work with unranslated keys
through the process until applying them.
Fixes #3780
Matthias Clasen [Tue, 23 Mar 2021 19:24:30 +0000 (15:24 -0400)]
gtk-builder-tool: Avoid a crash with <placeholder/>
Not sure we can do much with a ui file that has
<placeholder/> elements littered throughout. But
at least we can avoid crashing while trying to
convert it.
Fixes: #3781
Emmanuele Bassi [Tue, 23 Mar 2021 15:39:47 +0000 (15:39 +0000)]
Merge branch 'ebassi/for-master' into 'master'
Ebassi/for master
See merge request GNOME/gtk!3338
Emmanuele Bassi [Tue, 23 Mar 2021 14:58:03 +0000 (14:58 +0000)]
docs: Add a side bar to the docs.gtk.org landing page
Make it look like the API references hosted on docs.gtk.org.
Emmanuele Bassi [Tue, 23 Mar 2021 14:49:20 +0000 (14:49 +0000)]
docs: Update the Cairo reference link
Emmanuele Bassi [Tue, 23 Mar 2021 13:39:18 +0000 (13:39 +0000)]
Merge branch 'ebassi/for-master' into 'master'
Publish docs for Pango and GdkPixbuf
See merge request GNOME/gtk!3337
Emmanuele Bassi [Tue, 23 Mar 2021 13:09:28 +0000 (13:09 +0000)]
docs: Drop the external class for links to docs.gtk.org
Emmanuele Bassi [Tue, 23 Mar 2021 12:25:40 +0000 (12:25 +0000)]
docs: Link Pango and GdkPixbuf on docs.gtk.org
Emmanuele Bassi [Tue, 23 Mar 2021 12:25:08 +0000 (12:25 +0000)]
ci: Build Pango and GdkPixbuf's docs
We want to publish them alongside GTK's own API reference.
Matthias Clasen [Tue, 23 Mar 2021 00:49:54 +0000 (00:49 +0000)]
Merge branch 'bilelmoussaoui/expressions-annotations' into 'master'
Add missing nullable annotations to BoolFilter/StringFilter
See merge request GNOME/gtk!3334
Matthias Clasen [Mon, 22 Mar 2021 15:09:42 +0000 (15:09 +0000)]
Merge branch 'issue3715-gtk4' into 'master'
[gtk4] x11/dnd: Ignore XErrors from the COW
Closes #3715
See merge request GNOME/gtk!3336
Olivier Fourdan [Mon, 22 Mar 2021 14:34:31 +0000 (15:34 +0100)]
x11/dnd: Ignore XErrors from the COW
The DnD code for X11 adds the composite overlay window (aka COW) to the
cache.
Yet the X11 requests to get and release the COW may trigger XErrors that
we ought to ignore otherwise the client will abort.
Fixes: #3715
Chun-wei Fan [Mon, 22 Mar 2021 14:18:44 +0000 (14:18 +0000)]
Merge branch 'really-fix-3581' into 'master'
GDK-Win32: Remove extraneous call to _gdk_win32_append_event() (really fix issue #3581)
Closes #3581
See merge request GNOME/gtk!3306
Matthias Clasen [Mon, 22 Mar 2021 12:45:45 +0000 (12:45 +0000)]
Merge branch 'meson-install-script' into 'master'
Meson: Use gnome.install_script()
See merge request GNOME/gtk!3135
Bilal Elmoussaoui [Mon, 22 Mar 2021 11:42:19 +0000 (12:42 +0100)]
gtk: add missing nullable annotations to StringFilter
Bilal Elmoussaoui [Mon, 22 Mar 2021 11:42:13 +0000 (12:42 +0100)]
gtk: add missing nullable annotations to BoolFilter
Matthias Clasen [Mon, 22 Mar 2021 11:17:58 +0000 (11:17 +0000)]
Merge branch 'wip/baedert/for-master' into 'master'
ngl: Remove unused function
See merge request GNOME/gtk!3332
Matthias Clasen [Mon, 22 Mar 2021 02:37:14 +0000 (02:37 +0000)]
Merge branch 'better-dead-keys' into 'master'
Better dead keys
See merge request GNOME/gtk!3329
Matthias Clasen [Mon, 22 Mar 2021 01:05:20 +0000 (21:05 -0400)]
Regenerate compose sequence file
Update our compose sequences based on the current
update xorg Compose.pre file. Beyond that, remove
some deadkey sequences that we are now handling
(better) in code.
Matthias Clasen [Mon, 22 Mar 2021 00:56:17 +0000 (20:56 -0400)]
Move compose related tooling to a subdir
This reduces the clutter in gtk/.
Matthias Clasen [Mon, 22 Mar 2021 00:53:24 +0000 (20:53 -0400)]
compose-parse: Add a negative lookaside
Make this script parse gtk-compose-remove.txt for
sequences to remove from the xorg Compose file.
This will be used for removing some deadkey combinations
that we can handle better in code.
Also, make this script explicitly python2. I tried
porting it to python3, but gave up in the end.
Matthias Clasen [Sun, 21 Mar 2021 22:51:57 +0000 (18:51 -0400)]
imcontext: Improve dead key handling more
For sequences like ``, we want to commit the first
deadkey and then continue preedit with the second.
The alternative is to do chained deadkeys, where
entering ~~a yields ̃̀̃̃a. But we don't do that, and
I think that would be more controversial.
Matthias Clasen [Sun, 21 Mar 2021 22:17:32 +0000 (18:17 -0400)]
imcontext: Improve dead key handling
For sequences like `x, where we don't have a compose
sequence, we still want to commit "`x", and not silently
eat the keys.
Matthias Clasen [Sun, 21 Mar 2021 20:48:04 +0000 (20:48 +0000)]
Merge branch 'matthiasc/for-master' into 'master'
Matthiasc/for master
See merge request GNOME/gtk!3328
Emmanuel Gil Peyrot [Sun, 21 Mar 2021 20:02:08 +0000 (20:02 +0000)]
gdkglcontext-wayland: Fallback to GLES 2.0 after legacy failed
This lets the NGL backend be selected instead of the Cairo backend on
devices which expose both GL and GLES, but have better support of GLES.
Tested on a PinePhone.
Matthias Clasen [Sun, 21 Mar 2021 20:02:39 +0000 (16:02 -0400)]
inspector: Allow inspecting Unicode
Add a way to show text as a Unicode sequence.
This can be helpful in understanding what is
happening with text.
Matthias Clasen [Sat, 20 Mar 2021 03:18:43 +0000 (23:18 -0400)]
ngl: Fix a rounding error in subpixel positioning
1024 / 4 is 256, not 250.
Matthias Clasen [Sat, 20 Mar 2021 03:17:58 +0000 (23:17 -0400)]
gl: Fix a rounding error in subpixel positioning
1024 / 4 is 256, not 250.
Matthias Clasen [Sat, 20 Mar 2021 01:56:48 +0000 (21:56 -0400)]
build: Disable g_assert in release builds
The ngl renderer is heavily using g_assert, and it
is written with the assumption that these assertions
will be compiled out in release builds.
Matthias Clasen [Sat, 20 Mar 2021 01:03:53 +0000 (21:03 -0400)]
calendar: Typo fix
Matthias Clasen [Sat, 20 Mar 2021 00:50:40 +0000 (20:50 -0400)]
ngl: Remove an unused field
We are ignoring the debug nodes, so the
debug_groups string chunk is unused.
Matthias Clasen [Fri, 19 Mar 2021 23:13:16 +0000 (19:13 -0400)]
ngl: Always populate the glyph front cache
There is no reason not to do this also in the
case when we upload the glyph.
Matthias Clasen [Fri, 19 Mar 2021 22:58:29 +0000 (18:58 -0400)]
ngl: Use floorf consistently
Timm Bäder [Sun, 21 Mar 2021 17:00:10 +0000 (18:00 +0100)]
ngl: Remove unused function
Piotr Drąg [Sat, 20 Mar 2021 14:41:34 +0000 (15:41 +0100)]
Update Polish translation
Emmanuele Bassi [Sat, 20 Mar 2021 12:31:10 +0000 (12:31 +0000)]
Merge branch 'ebassi/for-master' into 'master'
Ebassi/for master
See merge request GNOME/gtk!3324
Emmanuele Bassi [Sat, 20 Mar 2021 12:18:42 +0000 (12:18 +0000)]
docs: Put core deps below UI links
We assume people will be more interested in GTK if they get to
docs.gtk.org.
Emmanuele Bassi [Sat, 20 Mar 2021 12:18:26 +0000 (12:18 +0000)]
docs: Fix typo in the docs landing page
Yuri Chornoivan [Sat, 20 Mar 2021 08:54:01 +0000 (08:54 +0000)]
Update Ukrainian translation
Yuri Chornoivan [Sat, 20 Mar 2021 08:51:46 +0000 (08:51 +0000)]
Update Ukrainian translation
Emmanuele Bassi [Fri, 19 Mar 2021 22:31:37 +0000 (22:31 +0000)]
Merge branch 'a11y-strdup' into 'master'
a11y: Don't copy attribute names in attribute sets
See merge request GNOME/gtk!3323
Matthias Clasen [Fri, 19 Mar 2021 21:00:04 +0000 (17:00 -0400)]
a11y: Don't copy attribute names in attribute sets
We only need these names when serializing a11y information
for tests. And copying these strings is entirely unnecessary.
So, just pass a callback instead.
Matthias Clasen [Fri, 19 Mar 2021 18:59:33 +0000 (18:59 +0000)]
Merge branch 'ngl-glyph-cache' into 'master'
Ngl glyph cache
See merge request GNOME/gtk!3322
Matthias Clasen [Fri, 19 Mar 2021 18:30:19 +0000 (14:30 -0400)]
ngl: Improve the glyph front cache
The effectiveness of the front cache is limited by
subpixel positioning making it very likely that we
will meet the same glyph in different x phases inside
a single line of text.
Factoring the xphase into the front cache key makes things
better. For the string
eeeeeeeeeeeeeeeeeee
before: 0% front cache hits
after: >90% front cache hits
Matthias Clasen [Fri, 19 Mar 2021 18:05:15 +0000 (14:05 -0400)]
ngl: Drop an unused struct member
GskNglGlyphLibrary.hash_table wasn't used.
Matthias Clasen [Fri, 19 Mar 2021 18:04:27 +0000 (14:04 -0400)]
texttag: A few typo fixes
Emmanuele Bassi [Fri, 19 Mar 2021 17:57:42 +0000 (17:57 +0000)]
Merge branch 'ebassi/for-master' into 'master'
Ebassi/for master
See merge request GNOME/gtk!3321
Emmanuele Bassi [Fri, 19 Mar 2021 17:23:46 +0000 (17:23 +0000)]
docs: Restructure the list of UI libraries
Put GTK at the top.
Emmanuele Bassi [Fri, 19 Mar 2021 17:23:29 +0000 (17:23 +0000)]
docs: Fix typo in the docs landing page
Matthias Clasen [Fri, 19 Mar 2021 17:17:02 +0000 (13:17 -0400)]
Revert "ngl: Remove duplicate check"
This reverts commit
1fd534ef1ee0f5e62dbdcf1f82ed7dc287d77d13.
This change revealed that we are not treating damage regions
correctly, and we regularly end up with
Emmanuele Bassi [Fri, 19 Mar 2021 14:55:12 +0000 (14:55 +0000)]
Merge branch 'ebassi/for-master' into 'master'
Fix the landing page structure
See merge request GNOME/gtk!3320
Emmanuele Bassi [Fri, 19 Mar 2021 14:36:34 +0000 (14:36 +0000)]
Fix the landing page structure
Emmanuele Bassi [Fri, 19 Mar 2021 14:14:46 +0000 (14:14 +0000)]
Merge branch 'pages-index' into 'master'
Add a landing page for the GitLab pages root
See merge request GNOME/gtk!3319
Emmanuele Bassi [Fri, 19 Mar 2021 13:54:32 +0000 (13:54 +0000)]
Add a landing page for the GitLab pages root
Right now, we land inside a 404 if we go to:
https://gnome.pages.gitlab.gnome.org/gtk/
as we have all our API references in a sub-level. We should have a
landing page for the root, similar to developer.gnome.org/references/.
Matthias Clasen [Fri, 19 Mar 2021 05:44:39 +0000 (05:44 +0000)]
Merge branch 'matthiasc/for-master' into 'master'
Matthiasc/for master
See merge request GNOME/gtk!3317
Matthias Clasen [Fri, 19 Mar 2021 00:30:29 +0000 (20:30 -0400)]
text tag: Typo fix
Matthias Clasen [Fri, 19 Mar 2021 00:30:07 +0000 (20:30 -0400)]
Cosmetics
Remove a stale comment.
Matthias Clasen [Fri, 19 Mar 2021 00:16:59 +0000 (20:16 -0400)]
Cosmetics
Pack the GtkTextAttributes struct better.
Matthias Clasen [Thu, 18 Mar 2021 23:44:21 +0000 (19:44 -0400)]
release script: Include gi-docgen
This lets us say 'you don't need to package this'
about gi-docgen.
Matthias Clasen [Fri, 19 Mar 2021 02:01:34 +0000 (02:01 +0000)]
Merge branch 'ngl-by-default' into 'master'
gsk: Make ngl the default OpenGL renderer
See merge request GNOME/gtk!3313
Matthias Clasen [Fri, 19 Mar 2021 01:59:29 +0000 (01:59 +0000)]
Merge branch 'wip/chergert/fix-ngl-cache-eviction' into 'master'
fix ngl cache eviction
Closes #3771
See merge request GNOME/gtk!3316
Christian Hergert [Fri, 19 Mar 2021 00:54:48 +0000 (17:54 -0700)]
ngl: clear Glyph front cache at the beginning of a frame
We don't want to be responsible for duplicating the effort of the hash
table, we just want to speed up subsequent lookups. Otherwise, we risk
not marking glyph usage when tracking usage for compaction.
Christian Hergert [Fri, 19 Mar 2021 00:53:37 +0000 (17:53 -0700)]
ngl: implement atlas compaction
This required finishing up the begin_frame/end_frame semantics for
GskNglTextureLibraryw which was apparently overlooked.
The driver was changed to provide more information to the library when
beginning frames. We do not need to use end_frame so that was removed.
The frame age is the same as GL (60) but I do wonder if that is based
on seconds if we should be using something longer for situations where
we have higher frame rates.
Fixes #3771
Matthias Clasen [Thu, 18 Mar 2021 21:43:14 +0000 (21:43 +0000)]
Merge branch 'matthiasc/for-master' into 'master'
inspector: Respect GDK_DEBUG=vulkan-disable
Closes #3748
See merge request GNOME/gtk!3312
Matthias Clasen [Thu, 18 Mar 2021 21:42:35 +0000 (21:42 +0000)]
Merge branch 'bilelmoussaoui/4.2-annotations' into 'master'
IMContext: add since annotations to the new APIs
See merge request GNOME/gtk!3315
Bilal Elmoussaoui [Thu, 18 Mar 2021 21:25:38 +0000 (22:25 +0100)]
IMContext: add since annotations to the new APIs
Matthias Clasen [Thu, 18 Mar 2021 03:27:41 +0000 (23:27 -0400)]
gsk: Make ngl the default OpenGL renderer
We will keep the original GL renderer around for
a while, to have an alternative. But we want to
get wider testing of the new renderer.
Matthias Clasen [Thu, 18 Mar 2021 17:55:26 +0000 (17:55 +0000)]
Merge branch 'wip/chergert/fix-3770' into 'master'
ngl: ensure vertices buffer allocates enough vertices
Closes #3770
See merge request GNOME/gtk!3314
Christian Hergert [Thu, 18 Mar 2021 17:43:24 +0000 (10:43 -0700)]
ngl: ensure vertices buffer allocates enough vertices
It's not guaranteed that a single power of two growth will be enough.
Fixes #3770
Matthias Clasen [Thu, 18 Mar 2021 04:14:25 +0000 (00:14 -0400)]
Cosmetics
Pango lets us pass NULL for the font desc and language
in pango_context_get_font_metrics() to use the context
values.
Matthias Clasen [Thu, 18 Mar 2021 03:19:08 +0000 (23:19 -0400)]
inspector: Respect GDK_DEBUG=vulkan-disable
Respect the debug settings for disabling Vulkan or GL,
and do not try to initialize those contexts. This can
be necessary to work around crashes.
Fixes: #3748
Matthias Clasen [Thu, 18 Mar 2021 00:31:10 +0000 (00:31 +0000)]
Merge branch 'matthiasc/for-master' into 'master'
Matthiasc/for master
Closes #3765
See merge request GNOME/gtk!3311
Matthias Clasen [Wed, 17 Mar 2021 22:16:47 +0000 (18:16 -0400)]
label: Fix tooltips on links
Fix pointed out by Timm Baeder.
Fixes: #3765
Matthias Clasen [Wed, 17 Mar 2021 20:26:40 +0000 (16:26 -0400)]
media: Always use GL with gstreamer
As long as we can create a GL context, pass one to
gstreamer. This at least gets us GL textures with
the ngl renderer, the previous code was arbitrarily
refusing that.
Timm Bäder [Wed, 17 Mar 2021 16:04:57 +0000 (16:04 +0000)]
Merge branch 'gsk-border-node-diff-fix-typo' into 'master'
Fix a typo in gsk_border_node_diff
See merge request GNOME/gtk!3310
Andrey Kozlovskiy [Wed, 17 Mar 2021 15:38:01 +0000 (15:38 +0000)]
Fix a typo in gsk_border_node_diff
Typo was introduced in !3278 and results in an incorrect handling of different uniformity.
Emmanuele Bassi [Wed, 17 Mar 2021 14:09:37 +0000 (14:09 +0000)]
Merge branch 'select-list-model-null' into 'master'
gtk: Allow selection models to take null list model during construction
See merge request GNOME/gtk!3309
Matthias Clasen [Wed, 17 Mar 2021 12:32:45 +0000 (12:32 +0000)]
Merge branch 'matthiasc/for-master' into 'master'
Matthiasc/for master
Closes #3763
See merge request GNOME/gtk!3308
Matthias Clasen [Wed, 17 Mar 2021 11:56:07 +0000 (07:56 -0400)]
lpr: Fix various compiler warnings
gcc 11 is warning about some const mixups here.
Fix them.
Matthias Clasen [Wed, 17 Mar 2021 11:51:27 +0000 (07:51 -0400)]
treestore: Initialize some local variables
gcc 11 is warning that these might be used uninitialized
otherwise.
Matthias Clasen [Wed, 17 Mar 2021 11:50:24 +0000 (07:50 -0400)]
sizerequest: Avoid a corner case
gcc 11 warns that the code isn't safe when
n_requested_sizes is 0. Add a precondition check
to make it clear that that never happens.
Matthias Clasen [Wed, 17 Mar 2021 11:49:06 +0000 (07:49 -0400)]
cssshadowvalue: Handle error condition propertly
We were parsing off the end of our array before noticing
that we've gone too far. gcc 11 warns about this.
Matthias Clasen [Wed, 17 Mar 2021 11:37:33 +0000 (07:37 -0400)]
checkbutton: Add a warning about cyclic groups
Setting up check or toggle button group relationships
in a cycle will lead to lockups. Add a warning about
this, and catch the simplest case with a precondition
check.
Fixes: #3763
Matthias Clasen [Tue, 16 Mar 2021 21:22:45 +0000 (17:22 -0400)]
Drop the gtk-doc subproject
No longer used.
Chun-wei Fan [Wed, 17 Mar 2021 03:09:37 +0000 (11:09 +0800)]
GDK-Win32: Remove extraneous call to _gdk_win32_append_event()
Apparently, by comparing with the other backends, we should not call
_gdk_win32_append_event() after calling gdk_scroll_event_new() but we should
call it after calling gdk_scroll_event_new_discrete(), which was why we didn't
restore the cursor after we scroll using the mouse wheel and didn't manage to
remove the shade that appears after we scrolled to the very top or very bottom.
Also, as suggested by the reporter, use IDC_SIZEALL for the system cursor that
we fall back to if no cursor theme is installed, as with other Windows
programs.
This should really fix issue #3581.
Balázs Úr [Tue, 16 Mar 2021 23:49:27 +0000 (23:49 +0000)]
Update Hungarian translation
Matthias Clasen [Tue, 16 Mar 2021 19:12:05 +0000 (19:12 +0000)]
Merge branch 'matthiasc/for-master' into 'master'
dnd: Add some warnings to the docs
See merge request GNOME/gtk!3305
Matthias Clasen [Tue, 16 Mar 2021 18:24:04 +0000 (14:24 -0400)]
dnd: Add some warnings to the docs
Add some warnings about pitfalls of the async dnd api.